Skip to content

feat: post delete and post save usercourse instances #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 8, 2021

Conversation

orronai
Copy link
Collaborator

@orronai orronai commented Oct 5, 2021

  • Change user`s last course viewed depending on the saving and deleting of usercourses instances
  • Added a test

- Change user`s last course viewed depending on the saving and deleting of usercourses instances
- Added a test
@codecov
Copy link

codecov bot commented Oct 5, 2021

Codecov Report

Merging #325 (7fa2b8e) into master (f18eeca) will decrease coverage by 0.06%.
The diff coverage is 70.00%.

❗ Current head 7fa2b8e differs from pull request most recent head 0405a24. Consider uploading reports for the commit 0405a24 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
- Coverage   83.37%   83.30%   -0.07%     
==========================================
  Files          61       61              
  Lines        2683     2702      +19     
==========================================
+ Hits         2237     2251      +14     
- Misses        446      451       +5     
Impacted Files Coverage Δ
lms/lmsdb/bootstrap.py 16.20% <14.28%> (-0.07%) ⬇️
lms/lmsdb/models.py 90.48% <100.00%> (+0.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f18eeca...0405a24. Read the comment docs.

Copy link
Member

@yammesicka yammesicka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an awesome idea, kudos!

Copy link
Member

@yammesicka yammesicka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an awesome idea, kudos!

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 6, 2021

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.16%.

Quality metrics Before After Change
Complexity 1.19 ⭐ 1.20 ⭐ 0.01 👎
Method Length 34.77 ⭐ 34.84 ⭐ 0.07 👎
Working memory 6.61 🙂 6.55 🙂 -0.06 👍
Quality 82.58% 82.74% 0.16% 👍
Other metrics Before After Change
Lines 1225 1269 44
Changed files Quality Before Quality After Quality Change
lms/lmsdb/bootstrap.py 79.27% ⭐ 79.33% ⭐ 0.06% 👍
lms/lmsdb/models.py 84.56% ⭐ 84.63% ⭐ 0.07% 👍
tests/test_users.py 82.92% ⭐ 83.50% ⭐ 0.58% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
lms/lmsdb/models.py Solution._base_next_unchecked 0 ⭐ 95 🙂 20 ⛔ 57.42% 🙂 Extract out complex expressions
lms/lmsdb/models.py User.notes 1 ⭐ 92 🙂 18 ⛔ 58.26% 🙂 Extract out complex expressions
lms/lmsdb/bootstrap.py _migrate_column_in_table_if_needed 6 ⭐ 116 🙂 11 😞 59.05% 🙂 Extract out complex expressions
lms/lmsdb/models.py Solution.create_solution 4 ⭐ 135 😞 10 😞 60.60% 🙂 Try splitting into smaller methods. Extract out complex expressions
lms/lmsdb/bootstrap.py _rename_column_in_table_if_needed 2 ⭐ 104 🙂 10 😞 66.46% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@orronai orronai merged commit 8a41e38 into master Oct 8, 2021
@orronai orronai deleted the post-save-usercourse branch October 8, 2021 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants